package test2.mycat;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.List;

import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.druid.DruidPlugin;

public class App {
	
	static String url = "jdbc:mysql://localhost:8066/TESTDB?characterEncoding=UTF-8";
	static String username = "test";
	static String password = "test";
	static int pageSize = 1000;
	
	public static void main(String[] args) {
		DruidPlugin dp = new DruidPlugin(url, username, password);
		ActiveRecordPlugin arp = new ActiveRecordPlugin(dp);
		arp.setDevMode(true);
		arp.setShowSql(true);
		dp.start();
		arp.start();
		
		Db.update("insert into table1(id) values(3)");
		
//		List<Record> list = Db.find("select * from table1");
//		System.out.println(list);
	}

}
